package com.buvaka.features;

public class FeatureCollection implements Features{
	private Feature[] features;
	public FeatureCollection(Feature[] features){
		this.features = features;
	}
	
	@Override
	public String toString(){
		StringBuilder str = new StringBuilder().append(OPEN).append(TYPE_FEATURE_COLLECTION).append(COMMA).append(FEATURES).append(OPEN_ARRAY);
		for(Feature feature : features){
			str.append(feature).append(COMMA);
		}
		str.setLength(str.length() - 2); //remove comma + space at the end
		return str.append(CLOSE_ARRAY).append(CLOSE).toString();
	}

	@Override
	public String getProperties() {
		//NOP
		return "";
	}
}
